import { createApp } from 'vue'
import App from '@/App.vue'
import router from '@/router'
import { createPinia } from 'pinia'
import useUserInfoStore from "@/store/userInfo";

// element-plus css
import 'element-plus/dist/index.css'

// animate.css
import 'animate.css';

// global css
import './style.css'


const app = createApp(App)

app.use(createPinia())
app.use(router)
app.mount('#app')


// 监听用户信息变化
let userInfoStore = useUserInfoStore();
userInfoStore.$subscribe((mutation: any, state: any) => {
    let { avatarSrc, realName } = state.userInfo
    console.log(avatarSrc, realName)
})